package com.lgc.login

import androidx.activity.viewModels
import androidx.lifecycle.ViewModelProvider
import com.alibaba.android.arouter.facade.annotation.Route
import com.blankj.utilcode.util.ToastUtils
import com.lgc.common.base.BaseActivity
import com.lgc.login.databinding.ActivityLoginBinding
import com.lgc.login.ui.TextViewModel

/**
 * 登录模块
 */
@Route(path = "/login/login")
class LoginActivity:BaseActivity<ActivityLoginBinding> (){
     val viewModel by lazy { ViewModelProvider(this).get(LoginViewModel::class.java)}
//    val textViewModel by lazy { ViewModelProvider(this).get(TextViewModel::class.java) }
    override fun getLayoutRes(): Int =R.layout.activity_login
    override fun initView() {
        super.initView()
        mBinding.apply {
            vm=viewModel
            //点击事件

            mtoolbarLogin.setNavigationOnClickListener {finish()}

            //测试
            tvForgetPwdLogin.setOnClickListener {
                ToastUtils.showShort("点击了忘记密码")
                //textViewModel.changeText2("00000")
            }

        }
    }
    override fun initConfig() {
        super.initConfig()
        viewModel.apply {

        }
    }
    override fun initData() {
        super.initData()
    }
}